package com.lib.mapper;

import com.lib.pojo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserLoginMapper {

    //1：用户登录时根据openIdP查询数据库
    @Select("select * from library.user where openid = #{openId}")
    User getByOpenid(String openid);

    //2:是新用户，注册用户信息
    void insert(User user);
}
